# 定义文件名和内容
filename = "output.txt"
content = "Hello, this is a sample text file!\nCreated using Python."

# 写入文件
with open(filename, "w", encoding="utf-8") as file:
    file.write(content)

print(f"文件 '{filename}' 已成功创建！")